@use '@scss/common' as *;

$curve: cubic-bezier(0.165, 0.84, 0.44, 1);

.newsletterSignUp {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.errorWrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--theme-error-500);
  @include small;
}

.subscribeAction {
  display: flex;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.subscribeDesc {
  color: var(--theme-text);
  margin: 0;
  @include small;
}

.inputWrap {
  position: relative;

  .inputArrow:hover {
    transform: translateX(6px) rotate(45deg);
  }
}

.emailInput input {
  @include body;
  padding: 1rem 1.5rem;
  // background: var(--theme-elevation-0);
  background: transparent;
  border-color: var(--grid-line-dark);
  border-left: none;
  border-right: none;
  margin-left: 1px;
  width: calc(100% - 2px);
  height: auto;
  transition: border-color 350ms ease;

  &::placeholder {
    color: var(--theme-text);
    opacity: 0.3;
    transition: opacity 350ms ease;
  }

  &:hover::placeholder {
    opacity: 0.5;
    border-color: var(--grid-line-dark);
  }

  &:active,
  &:focus {
    border-color: rgba(255, 255, 255, 0.25);

    &::placeholder {
      opacity: 0.5;
    }
  }
}

.inputArrow {
  z-index: 1;
  color: var(--theme-text);
  transform: rotate(45deg);
  transition: transform 350ms $curve;
  height: 0.6rem;
  width: auto;
}

.submitButton {
  @include btnReset;
  cursor: pointer;
  display: block;
  position: absolute;
  right: 1.5rem;
  top: calc(50% - 0.6rem);
  transition:
    transform 350ms $curve,
    opacity 350ms $curve;

  &:disabled {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.3;
  }
}
